<template>
    <div>
        <h1>Father</h1>
        <!-- 属性穿透 -->
        <SonVue :money="money" class="giveson" id="son-id" @add-money="addMoney">
            <!-- 用来定义子组件显示结构 -->
            <template v-slot:hand="data">
                <div> give you  son, 这是我最后的钱{{money}}</div>
                <div>我自己的钱包{{data.wallet}}</div>
            </template>
        </SonVue>
        <Title><i class="icon"></i>xxxx</Title>
    </div>
</template>

<script setup>
import SonVue from './Son.vue';
import {ref} from 'vue'
let money=ref(10000)
let addMoney=(state)=>{
    money.value++;
    console.log("孩子传话了===>",state);
}
</script>

<style scoped>

</style>